extends layout

block content
	script(src="/javascripts/aaron/common.js")
	script(src="/javascripts/aaron/nodes.js")
	script(src="/javascripts/aaron/workflow.js")
	link(rel='stylesheet', href='/stylesheets/aaron/style.css')
	div(style="position:fixed;width:250px;height:800px;z-index:0;top:30px;right:0px;background-color:#fff", class="righNav")
			table(cellpadding=2, width="100%", style="margin-top:20px;background-color:#fff")
				tr
					td(style="text-indent:5px;background-color:#eee") 
						img(src="/images/controls.gif", style="border:0px;vertical-align:middle")
						label &nbsp;Controls
				tr
					td(valign="top")
						table(border=0, width="100%")
							tr
								td
									a(class="control addNode",id="", style="cursor:pointer",type="1")
										img(src="/images/node.png", style="border:0px;vertical-align:middle")
										label(style="cursor:pointer") &nbsp Add Node
								td
									a(class="control addCondition",id="", style="cursor:pointer",type="1")
										img(src="/images/condition(add).png", style="border:0px;vertical-align:middle")
										label(style="cursor:pointer") &nbsp Add Condition
									
				tr
					td(style="text-indent:5px;background-color:#eee")
						img(src="/images/properties.gif", style="border:0px;vertical-align:middle")
						label &nbsp;Properties
				tr
					td
						table(cellpadding=5)
							tr(style="display:none")
									td Node ID:
									td
										input(id="node_id",type="text")
										input(id="form_id",value="#{formID}")
							tr
									td Height:
									td
										input(class="nodeHeight",type="text",onkeyup="setNodeProperty(this, 'Height')",maxlength="3")
							tr
									td Width:
									td
										input(class="nodeWidth",type="text",onkeyup="setNodeProperty(this, 'Width')",maxlength="3")
							tr
								td Processor Type:
								td
									select(class="processorType",onChange="setNodeProperty(this, 'Processor Type')")
										option(value = 0) --Select--
										option(value = 1) Department Position
										option(value = 2) Company Position
										option(value = 3) Employee
							tr
								td Processor:
								td
									select(class="processor",onChange="setNodeProperty(this, 'Processor')")
										option(value = 0) --Select--
							//tr
								td Action Status:
								td
									select(class="actionStatus")
										option(value = 0) --Select--
				tr
					td(style="text-indent:5px;background-color:#eee") 
						img(src="/images/controls.gif", style="border:0px;vertical-align:middle")
						label &nbsp;Button Choices
				tr
					td
						table(cellpadding=5)
							tr
								td(style="width:100%") Button:
								td
									select(class="setButton",onChange="setNodeButtons()")
										option(value = 0) --Select--formID
				tr
					td(style="text-indent:5px;background-color:#eee") 
						img(src="/images/controls.gif", style="border:0px;vertical-align:middle")
						label &nbsp;Button Properties
				tr
					td
						div(style="width:95%;overflow:auto;height:250px;",class="nodeButtons")
	div(id="cList", title="List",style="display:none;height:auto:width:auto")
		table(width="100%")
			tr
				td
					label Enter choices per line:
			tr
				td
					textarea(id="txtList",cols="50", rows="13", style="resize:none") 
			tr
				td(align="right")
					input(type="button", value="OK", class="classname", id="ListOk") 
			
	//div(id="",style="z-index:-1;width:auto;height:auto;")
		a(class="classname",id="saveWorkflow",style="cursor:pointer") Save
		label &nbsp;
		a(href="/",class="classname",id="closeWorkflow",style="cursor:pointer") Close
	div(id="divSave",title="Save as...",style="display:none")
		
		
		form(method="POST", name="orgchart")
			table(width="100%")
				tr
					td
						label Title:
					td
						input(type="text", name="orgChartTitle", id="workFlowTitle", style="width:340px")
				tr
					td
						label Description:
					td
						textarea(name="description",rows="4", cols="60",id="workFlowDesc", style="resize:none")
				tr
					td
						label Delegate Request:
					td
						select(id="delegateRequest", style="width:325px")
							option(value="1") Back to the requestor
							option(value="2") Move to the next processor
				tr
					td &nbsp;
					td(align="right")
						input(type="button", id="saveOrgchart", class="classname", value="Save",onclick="saveNewWorkflow()")
	div(style="font-size:15px;font-weight:bold") #{formTitle}		
	hr
	div(class="leftPanel",id="droppable",style="overflow:auto;z-index:-1;background-image:url('/images/workspace.jpg');width:900px;height:700px;border:1px Solid #ccc")
	div(class="nodeContent",style="display:none")
		input(type="text",class="startCtr",value="#{startCtr}") 
		span(class="nodesDB") #{nodes}
		br
		span(class="linesDB") #{lines}